import 'package:flutter/material.dart';

class AuditManagePage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _AuditState();
}

class _AuditState extends State<AuditManagePage> {
 /* TabController _tabController;
  BarChartUtil _barChartUtil;

  List<TabNavItem> tabs = [
    TabNavItem(
      text: '未稽查',
      activeIcon: Image.asset('assets/images/icon_no_task.png'),
      backgroundColor: Color(0xffEE8D54),
      startColor: Color(0xff58B1FF),
      endColor: Color(0xff76A9FB),
      icon: Image.asset(
        'assets/images/icon_no_task.png',
        color: Color(0xffCCCCCC),
      ),
    ),
    TabNavItem(
      activeIcon: Image.asset('assets/images/icon_has_task.png'),
      backgroundColor: Color(0xff76A9FB),
      startColor: Color(0xffEE8D54),
      endColor: Color(0xffEE8D54),
      icon: Image.asset(
        'assets/images/icon_has_task.png',
        color: Color(0xffCCCCCC),
      ),
      text: '已稽查',
    ),
    TabNavItem(
      activeIcon: Image.asset('assets/images/icon_task.png'),
      backgroundColor: Color(0xff3AD06C),
      startColor: Color(0xffEE8D54),
      endColor: Color(0xffEE8D54),
      icon: Image.asset(
        'assets/images/icon_task.png',
        color: Color(0xffCCCCCC),
      ),
      text: '总任务',
    ),
  ];*/

  @override
  void initState() {
    super.initState();
  /*  _barChartUtil = BarChartUtil(context: this.context, isBarChart: true);
    _tabController = TabController(
      vsync: ScrollableState(),
      length: tabs.length,
    );*/
  }

 /* @override
  void dispose() {
    _tabController.dispose();
    super.dispose();
  }

  List<Widget> _list = [
    AuditTaskPage(),
    AuditTaskPage(),
    AuditTaskPage(),
  ];*/

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('本月稽核任务统计'),
       /* actions: [
          Container(
            padding: EdgeInsets.only(top: 12, bottom: 12),
            margin: EdgeInsets.only(right: 15),
            child: RaisedButton(
              padding: EdgeInsets.all(7),
              color: Color(0xffbddbf5),
              onPressed: () {},
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Image.asset(
                    'assets/images/2.0x/icon_add.png',
                    width: width(24),
                    height: height(24),
                  ),
                  SizedBox(width: 3),
                  Text(
                    '新增稽核任务',
                    style:
                        TextStyle(color: Color(0xff2888de), fontSize: 12),
                  ),
                ],
              ),
            ),
          )*/
        // ],
      ),
    /*  body: Container(
        padding: EdgeInsets.only(left: 15, right: 15, top: 15, bottom: 30),
        child: Row(
          children: [
            Container(
              width: 380,
              child: Column(
                children: [
                  Container(
                    height: height(150),
                    child: TabNavBarWidget(
                      isScrollable: false,
                      tabs: this.tabs,
                      controller: _tabController,
                      labelColor: Colors.white,
                      unselectedLabelColor: Colors.grey,
                    ),
                  ),
                  Expanded(
                    child: Container(
                      margin: EdgeInsets.only(top: 10),
                      child: Stack(
                        children: [
                          Positioned(
                            child: Text(
                              '稽查任务统计',
                              style: TextStyle(
                                  color: Colors.orangeAccent, fontSize: 12),
                            ),
                          ),
                          Align(
                            child: BarChart(_barChartUtil.barChartController),
                          )
                        ],
                      ),
                    ),
                  ),
                ],
              ),
            ),
            Expanded(
              child: Container(
                margin: EdgeInsets.only(top: height(50), left: 15),
                child: Column(
                  children: [
                    listViewHeader(h: 25, list: [
                      ListViewHeaderModel(weight: 1, title: '序号'),
                      ListViewHeaderModel(weight: 3, title: '机构名称'),
                      ListViewHeaderModel(weight: 2, title: '机构类型'),
                      ListViewHeaderModel(weight: 3, title: '机构地址'),
                      ListViewHeaderModel(weight: 2, title: '联系电话'),
                      ListViewHeaderModel(weight: 1, title: '状态'),
                      ListViewHeaderModel(weight: 2, title: '未稽查数量'),
                      ListViewHeaderModel(weight: 1, title: '操作'),
                    ]),
                    Expanded(
                      child: ListView.builder(
                        padding: EdgeInsets.only(top: 0),
                        itemBuilder: (context, index) =>
                            _buildListViewItem(index),
                        itemCount: 20,
                      ),
                    )
                  ],
                ),
              ),
            )
          ],
        ),
      ),*/
    );
  }

 /* Widget _buildListViewItem(int index) {
    return Container(
      height: 30,
      color: (index % 2 == 0) ? Colors.white : Color(u_ffeff7fb),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          dividerVertical(),
          Expanded(
            flex: 1,
            child: Text(
              '${index + 1}',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 3,
            child: Text(
              '葵花药业',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 2,
            child: Text(
              '医保药店',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 3,
            child: Text(
              '光谷八路',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 2,
            child: Text(
              '027-87976666',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 1,
            child: Text(
              '未稽查',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 2,
            child: Text(
              '3',
              style: TextStyle(fontSize: 10),
              textAlign: TextAlign.center,
            ),
          ),
          dividerVertical(),
          Expanded(
            flex: 1,
            child:Theme(
              data: Theme.of(context).copyWith(
                buttonTheme: ButtonThemeData(
                  padding: EdgeInsets.symmetric(horizontal: 5.0),
                  height: 20.0,
                  minWidth: 35.0,
                ),
              ),
              child: OutlineButton(
                onPressed: () {
//                  NavigatorUtils.push(
//                      context, '${HomeRouter.doctorNurseDetail}?type=$type');
                },
                child: Text(
                  '详情',
                  style: TextStyle(
                    fontSize: 10,
                    color: Color(u_2787de),
                  ),
                ),
                borderSide: BorderSide(color: Color(u_2787de)),
              ),
            ),
          ),
          dividerVertical(),
        ],
      ),
    );
  }*/
}
